package roborally.model.executables.commands;

import roborally.model.*;
import roborally.model.executables.RobotCommand;
/**
 * RobotCommand that moves its robot into its current orientation.
 */
public class Move extends RobotCommand {

	public Move(Robot robot, Program program) {
		super(robot, program);
	}
	
	/**
	 *	@effect If the associated robot has enough energy to move, it will be moved. 
	 */
	@Override
	public void executeCommand() {
		if(getRobot().hasEnergyToMove())
			getRobot().move();
	}
	@Override
	public String toString(){
		return "move";
	}
}
